package day8;

/**
 * @author oldliu
 * @since 1.0
 */
public class Thread2Test {
    public static void main(String[] args) {
        System.out.println("主线程："+Thread.currentThread().getName()+"开始了");
        for(int i=1;i<=4;i++){
            //new Thread2("线程-"+i).start();
            Thread th=new Thread2("线程-"+i);
            if(i==4||i==1)
                th.setPriority(Thread.MIN_PRIORITY);
            else if(i==2)
                th.setPriority(Thread.MAX_PRIORITY);
            else
                th.setPriority(Thread.NORM_PRIORITY);
            th.start();
        }
        System.out.println("主线程："+Thread.currentThread().getName()+"结束了");
    }
}
